Skip to content

Conversation

@brabster
Copy link

@brabster brabster commented Aug 11, 2018

Fixes #10

Changes implemented as a result of wanting to to a Heroku demo and not wanting to write a frontend! Just drop me a line if you want me to adjust anything or tidy anything up. Good luck with the blog post!

I'll go through and overview changes in individual files.

High-level:

  • updated dependencies, fixed breaks
  • updated style of handlers to use promise chains and destructuring
  • swapped out the manual db migration to use db-migrate
  • set up for Heroku, including:
    • moved environment config to .env approach
    • added Procfile to configure app and release migration
    • added app.json for basic Heroku CI

@@ -0,0 +1,53 @@
'use strict';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a file generated by db-migrate

@@ -1,124 +1,38 @@
const express = require('express');
const router = express.Router();
const pg = require('pg');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pg lib works differently today - breaking changes from original

return res.json(results);
});
});
});
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprised by how much boilerplate went away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update dependencies, refactor to promises, Heroku bootstrap

1 participant